<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1{
            width: 200px;
            height: 30px;
            margin-left: 700px;
            font-size: 30px;
            color: #000;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
           
        }
        #one {
            width: 1550px;
            height: 650px;
            border: solid 2px;

            background-color: antiquewhite;
            margin-top: 20px;
            margin-left: 40px;
        }

        #two {
            display: inline-block;
            width: 400px;
            height: 400px;
            
            border: solid 10px;
            background-image: url(img/21.webp);
            background-size: 400px 400px;
            margin-top: 80px;
            margin-left: 60px;
            border-color: white;
        }

        #two1 {
            display: inline-block;
            width: 400px;
            height: 400px;
        
            border: solid 10px;
            background-image: url(img/17.webp);
            background-size: 400px 400px;
            background-repeat: no-repeat;
            margin-top: 80px;
            margin-left: 100px;
            border-color: white;
        }

        #two2 {
            display: inline-block;
            width: 400px;
            height: 400px;
            color: rgb(0, 38, 255);
            border: solid 10px;
            background-image: url(img/21.webp);
            background-size: 400px 400px;
            background-repeat: no-repeat;
            margin-top: 80px;
            margin-left: 100px;
            border-color: white;
        }
       
        #three1{
            display: inline-block;
            width: 100px;
            height: 70px;
            font-size: 30px;
            margin-top: 10px;
            margin-left: 150px;
            color: rgb(0, 42, 255);
            padding-left: 10px;
            padding-top: -10px;
            
            
        }
        #four{
            display: inline-block;
            width: 120px;
            height: 70px;
            font-size: 30px;
            margin-top: 10px;
            margin-left: 0px;
            color: rgb(0, 38, 255);
            padding-left: 0px;
            padding-top: -10px;
            position: absolute;
            
        }
        #five1{
            display: inline-block;
            width: 100px;
            height: 70px;
            font-size: 30px;
            margin-top: -75px;
            margin-left: 640px;
            color: rgb(0, 64, 255);
            padding-left: 50px;
            padding-top: -10px;
            position: absolute;
            
        }
        #five2{
            display: inline-block;
            width: 120px;
            height: 70px;
            font-size: 30px;
            margin-top: -75px;
            margin-left: 790px;
            color: rgb(0, 42, 255);
            padding-left: -100px;
            padding-top: -10px;
            margin-bottom: 200px;
            position: absolute;
            
        }
        #six1{
            display: inline-block;
            width: 100px;
            height: 70px;
            font-size: 30px;
            margin-top: -75px;
            margin-left: 1150px;
            color: rgb(0, 21, 255);
            padding-left: 50px;
            padding-top: -10px;
            position: absolute;
            
        }
        #seven{
            display: inline-block;
            width: 120px;
            height: 70px;
            font-size: 30px;
            margin-top: -75px;
            margin-left: 1270px;
            color: rgb(0, 60, 255);
            padding-left: -100px;
            padding-top: -10px;
            margin-bottom: 200px;
            position: absolute;
            
        }
        #eight{
            width: 1550px;
            height: 250px;
            border: solid 2px;
            border-bottom: none;
            margin-left: 9px;
        }
        table{
            border: solid 2px #000;
            border-bottom: none;
            width: 1550px;
            height: 20px;
            margin-left: 0px;
            border-collapse: collapse;
            text-align: center;
            background-color: antiquewhite;
        }
        tr, td{
            border: solid 2px #999;
            text-align: center;
            background-color: antiquewhite;
        }
    </style>
    <script src="jquery-3.4.1.min (1).js"></script>
    <script>
        $(document).ready(function(){
            let name,price,tid;
            $("#three,#five,#six").click(function(){
               // tid=$(this).attr('id');
                name=$(this).find("span:eq(0)").text();
                price=$(this).find("span:eq(1)").text();
                
            
            $("table").append("<tr><td>"+name+"</td><td>"+price+"</td><td><a href='#'>删除</a></td></tr>")
            $("tr:even").css("background-color","#00FFFF")});
            $("table").on("click","a",function(e){
                e.preventDefault();
                $(this).closest("tr").remove();  
              
                
                
            });})
        
    </script>
</head>

<body>
   
    <div id="one"> <h1>购物清单</h1><span id="two"></span><span id="two1"></span><span id="two2"></span>
    <div id="three"><span id="three1">洗衣机</span><span id="four">1000元</span></div>
    <div id="five"> <span id="five1">电视机</span><span id="five2">2000元</span></div>
    <div id="six"><span id="six1">风扇</span><span id="seven">400元</span></div>
</div>
    <div id="eight" style="clear: left;margin-left:40px">
        <table border="5">
            <tr>
                <th>物品名称</th>
                <th>价格</th>
                <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
            </tr>
        </table>
    </div>
</body>

</html>